<?php
function ListWeather_Admin()
{
    global $dbsql;
    ImportClass('json');    
    $sql_select = "select * from tblweather order by iOrder";
    $rs         = $dbsql->query($sql_select);
    $weathers   = array();    
    while ( $result = $dbsql->fetch_array($rs) )
    {
        $weather= FJSON::decode($result['cWeather'],true);
        $result['do']   = $weather['do'];    
        $result['Time']=@date("d/m/Y - H:i:s",$result['iTimeUpdate']);    
        $weathers[]     = $result;        

    }
    return $weathers;
}
?>